<?php

define("ROOT_DIR", realpath(dirname(__FILE__) . "/.."));

function __autoload($class) {
	// try core classes first
	if(file_exists(ROOT_DIR . "/core/$class.class.php"))
		include(ROOT_DIR . "/core/$class.class.php");
	// try libs directory
	if(file_exists(ROOT_DIR . "/libs/$class.class.php"))
		include(ROOT_DIR . "/libs/$class.class.php");
}